const webpack = require('webpack')

module.exports = {
  configureWebpack: {
    plugins: [
      new webpack.DefinePlugin({
        // 环境变量
        SERVICE_URL: JSON.stringify(process.env.NODE_ENV === 'development' ? 'dev.com' : 'prod.com')
      })
      // new CompressionPlugin()
      // new BundleAnalyzerPlugin()
    ]
  },
  productionSourceMap: true,
  publicPath: '/',
  devServer: {
    port: 8088,
    https: false,
    hotOnly: false
  }
}
